home *** CD-ROM | disk | FTP | other *** search
- unit IDESetU;
-
- interface
-
- uses
- {$ifdef Win32}
- Registry,
- {$else}
- Inifiles,
- {$endif}
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls;
-
- type
- TForm1 = class(TForm)
- CD: TColorDialog;
- btnTooltip: TButton;
- btnProp: TButton;
- procedure FormCreate(Sender: TObject);
- procedure FormDestroy(Sender: TObject);
- procedure btnTooltipClick(Sender: TObject);
- procedure btnPropClick(Sender: TObject);
- private
- {$ifdef Win32}
- Ini: TRegIniFile;
- {$else}
- Ini: TIniFile;
- {$endif}
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- {$ifdef Win32}
- Ini := TRegIniFile.Create('Software\Borland\Delphi\3.0');
- {$else}
- Ini := TIniFile.Create('Delphi.Ini');
- {$endif}
- end;
-
- procedure TForm1.FormDestroy(Sender: TObject);
- begin
- Ini.Free
- end;
-
- procedure TForm1.btnTooltipClick(Sender: TObject);
- begin
- CD.Color := StrToInt(Ini.ReadString(
- 'Globals', 'HintColor', IntToStr(Application.HintColor)));
- if CD.Execute then
- Ini.WriteString('Globals', 'HintColor',
- Format('$%x', [CD.Color]))
- end;
-
- procedure TForm1.btnPropClick(Sender: TObject);
- begin
- CD.Color := StrToInt(Ini.ReadString(
- 'Globals', 'PropValueColor', IntToStr(clWindowText)));
- if CD.Execute then
- Ini.WriteString('Globals', 'PropValueColor',
- Format('$%x', [CD.Color]))
- end;
-
- end.
-